// alert('hello React');
//导入 test.js 
// import H5211227, {run} from './test';  console.log(H5211227, run);
//导入 redux 的状态仓库
import store from './redux/store';
//1. 引入 react
import React from 'react';
import App from './App';
import PubSub from 'pubsub-js';
import { BrowserRouter, HashRouter } from 'react-router-dom';

//2. 引入 react-dom
import ReactDOM from 'react-dom';

//3. 创建虚拟 DOM 对象
// let vDOM = <h2>Hello React 脚手架 -- </h2>;

//4. 渲染
ReactDOM.render(<BrowserRouter><App /></BrowserRouter>, document.querySelector("#root"));

//状态一变, 全部渲染
store.subscribe(() => {
    ReactDOM.render(<BrowserRouter><App /></BrowserRouter>, document.querySelector("#root"));
})



